import { request } from './request';

export async function getAllTeacher() {
  return request('/api/teacher', {
    method: 'GET',
  })
}

export async function appendTeacher(data: any) {
  return request('/api/teacher', {
    method: 'POST',
    data,
  })
}

export async function updateTeacher(data: any) {
  return request(`/api/teacher/${data?.tId}`, {
    method: 'PUT',
    data,
  })
}

export async function destroyTeacher(data: any) {
  return request(`/api/teacher/${data?.tId}`, {
    method: 'DELETE',
  })
}

export default {
  getAllTeacher,
  appendTeacher,
  updateTeacher,
  destroyTeacher,
};
